A=[-1 2; 2 -3; -1 3];
b=[4 1 2]';

A'*A
A'*b
x=inv(A'*A)*A'*b

bp=A*x
b-bp
norm(b-bp)

